-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Bootstrap's collapse for wells. #857
Conversation
It's not perfect since the toggle button action happens instantly and the collapse has a delay but it's better than before. Any suggestions/patches welcome. |
/CC @Johann-S just in case you have time and any improvement ideas. |
Maybe that's related to : twbs/bootstrap#20870 🤔 |
var btnIcon = el[index].querySelector('span'); | ||
|
||
el[index].addEventListener('click', function() { | ||
document.getElementById(name).classList.toggle('hidden'); | ||
btnIcon.classList.toggle('caret-open'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can do to change the caret only when the collapse transition ended :
setTimeout(function () {
btnIcon.classList.toggle('caret-open');
}, 350);
350
is the transition duration of the Collapse plugin (https://github.com/twbs/bootstrap/blob/v3-dev/js/collapse.js#L35)
I haven't tried that but I will, thanks! I was trying to use transionend
but didn't spend a lot of time.
…On Jul 15, 2017 00:23, "Johann-S" ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In public/assets/js/main.js
<#857 (comment)>:
> var btnIcon = el[index].querySelector('span');
el[index].addEventListener('click', function() {
- document.getElementById(name).classList.toggle('hidden');
btnIcon.classList.toggle('caret-open');
Maybe you can do :
setTimeout(function () {
btnIcon.classList.toggle('caret-open');
}, 350);
350 is the transition duration of the Collapse plugin (
https://github.com/twbs/bootstrap/blob/v3-dev/js/collapse.js#L35)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#857 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVVtTHgMMFh_BsCDDYLvrwTAgaRpUlWks5sN9xqgaJpZM4OYrnb>
.
|
👍 |
a312d3a
to
342d909
Compare
No description provided.